function createXmlHttpRequest(){
        if(window.ActiveXObject){
          return new ActiveXObject("Microsoft.XMLHTTP");
        }else if(window.XMLHttpRequest){
          return new XMLHttpRequest();
        }
      }
  function getCompanyName(object){
      var carNumber = object.value ;         
      alert(carNumber);
      /**发动请求到服务器*/
      //请求字符串
      var url = "/xdoa/ajaxbookinginfoservlet?carNumber ="+carNumber;
      //创建XMLHttpRequest组件
      xmlHttpRequest = createXmlHttpRequest();
      // 设置回调函数
      xmlHttpRequest.onreadystatechange = callback ;
      // 初始化 XmlHttpRequest 组件
      xmlHttpRequest.open("GET",url,true);
      //发送请求
      xmlHttpRequest.send(null);
  }
  function callback(){
       if( xmlHttpRequest.readyState == 4 && xmlHttpRequest.status == 200 ){
        var b = xmlHttpRequest.responseXML.getElementsByTagName("result").firstChild.data;
        document.getElementById("companyName").value = b ;
     }
  }